package com.cskaoyan.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * value属性 URL路径映射
 * @author stone
 * @date 2022/10/05 17:30
 */
@Controller
@RequestMapping("user")
public class UrlMappingController {

    // localhost:8080/user/login
    //@RequestMapping({"user/login","user/query"})
    @RequestMapping({"login","query"})
    @ResponseBody //让我们能够响应字符串
    public String login() {
        return "hello SpringMVC";
    }

    //@RequestMapping({"user/bye*","user/bye/*"})
    @RequestMapping({"/bye*","/bye/*"})
    @ResponseBody //让我们能够响应字符串
    public String logout() {
        return "byebye";
    }
}
